// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:53:47

// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   fu.java

package com.zelix;

import java.io.*;
import java.util.HashSet;
import java.util.Hashtable;

// Referenced classes of package com.zelix:
//            kt, yc, fh, ks, 
//            is, zs, sm, gx, 
//            qy, jb, ed

public class fu extends kt
    implements sm
{

    boolean k;
    ks l;
    ks m;
    zs n;
    int o;
    byte p[];

    fu(kt kt1, jb jb, qy qy1, PrintWriter printwriter)
        throws IOException
    {
        int i;
        int j;
        int i1;
label0:
        {
            int j1 = kt.i;
            super(kt1);
            k = true;
            i = jb.readUnsignedShort();
            j = jb.readUnsignedShort();
            i1 = jb.readUnsignedShort();
            o = jb.readUnsignedShort();
            is is1 = a(i);
            is is2 = a(j);
            is is3 = a(i1);
            if((is1 instanceof ks) && (j == 0 || (is2 instanceof ks)))
            {
                l = (ks)is1;
                if(j != 0)
                    m = (ks)is2;
                if(i1 == 0)
                    break label0;
                if(is3 instanceof zs)
                {
                    n = (zs)is3;
                    qy1.b(n, this);
                    if(j1 == 0)
                        break label0;
                }
                k = false;
                if(j1 == 0)
                    break label0;
            }
            k = false;
        }
        if(!k)
        {
            p = new byte[8];
            p[0] = (byte)gx.a(i);
            p[1] = (byte)gx.b(i);
            p[2] = (byte)gx.a(j);
            p[3] = (byte)gx.b(j);
            p[4] = (byte)gx.a(i1);
            p[5] = (byte)gx.b(i1);
            p[6] = (byte)gx.a(o);
            p[7] = (byte)gx.b(o);
        }
    }

    public void a(zs zs1, zs zs2)
    {
        if(n == zs1)
            n = zs2;
    }

    int q()
    {
        return o;
    }

    String r()
    {
        String s1;
        String s2;
        int j1;
        j1 = kt.i;
        if(m == null)
            break MISSING_BLOCK_LABEL_89;
        s1 = m.b();
        s2 = l.b();
        if(j1 == 0) goto _L2; else goto _L1
_L1:
        int j = s2.lastIndexOf("$");
        int i1 = s2.lastIndexOf("+");
        int i = Math.max(j, i1);
        if(i > 0)
        {
            s2 = s2.substring(0, i);
            if(j1 == 0)
                continue; /* Loop/switch isn't completed */
        }
        s2 = null;
_L2:
        if(s2 != null && !s1.startsWith(s2)) goto _L1; else goto _L3
_L3:
        return s2;
        return null;
    }

    public String s()
    {
        if(m != null)
        {
            String s1 = m.b();
            if(!s1.equals(""))
                return s1;
        }
        return null;
    }

    public String a()
    {
        if(l != null)
        {
            String s1 = l.b();
            if(!s1.equals(""))
                return s1;
        }
        return null;
    }

    String t()
    {
        if(n != null)
        {
            String s1 = n.b();
            if(!s1.equals(""))
                return s1;
        }
        return null;
    }

    void b(HashSet hashset)
    {
        if(l != null)
            hashset.add(l);
        if(m != null)
            hashset.add(m);
    }

    void a(Hashtable hashtable)
    {
        if(n != null)
            hashtable.put(n, this);
    }

    boolean a(HashSet hashset, Hashtable hashtable)
    {
        String s1 = l.b();
        mt mt = fh.a(s1);
        if(mt != null)
        {
            boolean flag = hashset.contains(mt);
            if(flag && n != null)
                hashtable.put(n, n);
            return flag;
        } else
        {
            return false;
        }
    }

    boolean a(ed ed, Hashtable hashtable)
    {
        String s1 = l.b();
        mt mt = fh.a(s1);
        if(mt != null)
        {
            boolean flag = ed.a(mt) ^ true;
            if(flag && n != null)
                hashtable.put(n, n);
            return flag;
        } else
        {
            return false;
        }
    }

    void u()
    {
label0:
        {
            String s2;
label1:
            {
                if(n == null || n.b().length() <= 0)
                    break label0;
                String s1 = l.b();
                int i = s1.lastIndexOf('$');
                int j = s1.lastIndexOf('+');
                int i1 = Math.max(i, j);
                if(i1 != -1)
                {
                    s2 = s1.substring(i1 + 1);
                    if(kt.i == 0)
                        break label1;
                }
                s2 = "";
            }
            n.a(s2);
        }
    }

    protected void a(DataOutputStream dataoutputstream)
        throws IOException
    {
label0:
        {
            if(k)
            {
                dataoutputstream.writeShort(l.j());
                dataoutputstream.writeShort(m != null ? m.j() : 0);
                dataoutputstream.writeShort(n != null ? n.j() : 0);
                dataoutputstream.writeShort(o);
                if(kt.i == 0)
                    break label0;
            }
            dataoutputstream.write(p);
        }
    }

    protected void a(DataOutputStream dataoutputstream, Hashtable hashtable)
        throws IOException
    {
label0:
        {
label1:
            {
                int i;
label2:
                {
                    i = kt.i;
                    if(!k)
                        break label1;
                    dataoutputstream.writeShort(l.j());
                    dataoutputstream.writeShort(m != null ? m.j() : 0);
                    if(n == null)
                    {
                        dataoutputstream.writeShort(0);
                        if(i == 0)
                            break label2;
                    }
                    zs zs1 = (zs)hashtable.get(n);
                    if(zs1 != null)
                    {
                        dataoutputstream.writeShort(zs1.j());
                        if(i == 0)
                            break label2;
                    }
                    dataoutputstream.writeShort(n.j());
                }
                dataoutputstream.writeShort(o);
                if(i == 0)
                    break label0;
            }
            dataoutputstream.write(p);
        }
    }
}